]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
unlockDialog: Only cancel AuthPrompt if it exists
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Fri, 27 Mar 2020 23:35:36 +0000 (20:35 -0300)
committerFlorian Müllner <florian.muellner@gmail.com>
Fri, 27 Mar 2020 23:40:08 +0000 (23:40 +0000)
AuthPrompt is created on demand, and this._authPrompt is
expected to be null except on very strictly controlled
occasions. The idle monitor callback isn't one of them.

Check if AuthPrompt exists before cancelling it.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2371

js/ui/unlockDialog.js

index d27b1d59caacd75cea392bb7ab3485d786137f2b..2170f12a7699402f5a4751187b86c9dbaa365dd3 100644 (file)
@@ -761,7 +761,7 @@ var UnlockDialog = GObject.registerClass({
     }
 
     _escape() {
-        if (this.allowCancel)
+        if (this._authPrompt && this.allowCancel)
             this._authPrompt.cancel();
     }